Build: introduce ${BUILD_PLAT} target to create the top build directory
authorMasahiro Yamada <[email protected]>
Fri, 3 Nov 2017 18:12:28 +0000 (03:12 +0900)
committerMasahiro Yamada <[email protected]>
Mon, 6 Nov 2017 15:35:21 +0000 (00:35 +0900)
Some platforms (for ex. UniPhier) want to create files in the very
top of the build directory.  Add ${BUILD_PLAT} so such files can
depend on it.

Make existing directory targets depend on ${BUILD_PLAT} because
they are sub-directories of ${BUILD_PLAT}.

Signed-off-by: Masahiro Yamada <[email protected]>
Makefile
make_helpers/build_macros.mk
plat/rockchip/rk3399/platform.mk

index b32b417b6f35b5edd9cbc6b1fe5ee6df77d8efd7..a648d8c0b3d7c68f1f11002b259e31f4081bb55f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -260,6 +260,8 @@ include lib/stack_protector/stack_protector.mk
 
 include ${PLAT_MAKEFILE_FULL}
 
+$(eval $(call MAKE_PREREQ_DIR,${BUILD_PLAT}))
+
 # Platform compatibility is not supported in AArch32
 ifneq (${ARCH},aarch32)
 # If the platform has not defined ENABLE_PLAT_COMPAT, then enable it by default
index e59a64b42bdcd0ecfe2639ddfae632a475872d23..7531f6d8066388edd0e25d471bf3193dc74bd634 100644 (file)
@@ -291,7 +291,7 @@ define MAKE_BL
 
 # Create generators for object directory structure
 
-$(eval $(call MAKE_PREREQ_DIR,${BUILD_DIR},))
+$(eval $(call MAKE_PREREQ_DIR,${BUILD_DIR},${BUILD_PLAT}))
 
 $(eval $(foreach objd,${OBJ_DIRS},$(call MAKE_PREREQ_DIR,${objd},${BUILD_DIR})))
 
index 85cca1b6b462c70886c121c1ce981caa5e32b1a1..6cd5b242a8b37dea0968de24c9bf1a6d63cd2f67 100644 (file)
@@ -88,7 +88,7 @@ ${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c: $(RK3399M0FW)
 ${BUILD_PLAT}/bl31/cdn_dp.o: CCACHE_EXTRAFILES=$(HDCPFW)
 ${RK_PLAT_SOC}/drivers/dp/cdn_dp.c: $(HDCPFW)
 
-$(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},))
+$(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},${BUILD_PLAT}))
 .PHONY: $(RK3399M0FW)
 $(RK3399M0FW): | ${BUILD_M0}
        $(MAKE) -C ${RK_PLAT_SOC}/drivers/m0 BUILD=$(abspath ${BUILD_PLAT}/m0)